package com.threeonemeeting.activity;

import android.content.Intent;
import android.os.Bundle;

import com.threeonemeeting.DataCenter;
import com.threeonemeeting.tab.MultiActivityTab;

public class TabMessageActivity extends MultiActivityTab {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// 添加Activity
		addActivity("MainMessageActivity", new Intent(this,
				MainMessageActivity.class));

		// 消息明细
		addActivity("MessageDetailListActivity", new Intent(this,
				MessageDetailListActivity.class));

		// 登录
		addActivity("LoginActivity", new Intent(this, LoginActivity.class));

		// 注册
		addActivity("RegisterActivity",
				new Intent(this, RegisterActivity.class));

		// 写站内信
		addActivity("SendMessageActivity", new Intent(this,
				SendMessageActivity.class));

		if (DataCenter.getInstance().currentLoginUserInfo.nUserId == 0) {

			Bundle b = new Bundle();
			b.putString("jumpto", "MainMessageActivity");
			setCurrentTab("MainMessageActivity", "LoginActivity", b);
		} else {
			setCurrentTab("MainMessageActivity");
		}
	}

}
